home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
19
/
madtrb14.zip
/
SIGNORM.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-05-17
|
2KB
|
40 lines
(*-------------------------------------------------------------------------*)
(* SigNorm -- Significance of normal distribution *)
(*-------------------------------------------------------------------------*)
FUNCTION SigNorm( X : REAL ) : REAL;
(*-------------------------------------------------------------------------*)
(* *)
(* Function: SigNorm *)
(* *)
(* Purpose: Evaluates normal distribution probability *)
(* *)
(* Calling Sequence: *)
(* *)
(* P := SigNorm( X ); *)
(* *)
(* X --- ordinate of normal distribution *)
(* *)
(* P --- Resultant tail probability *)
(* *)
(* Calls: *)
(* *)
(* Erf *)
(* *)
(* Method: *)
(* *)
(* The simple relationship between the error function and the *)
(* normal distribution is used. *)
(* *)
(*-------------------------------------------------------------------------*)
BEGIN (* SigNorm *)
IF X >= 0.0 THEN
SigNorm := 1.0 - ( 1.0 + Erf( X / Sqrt2 ) ) / 2.0
ELSE
SigNorm := 1.0 - ( 1.0 - Erf( -X / Sqrt2 ) ) / 2.0;
END (* SigNorm *);